package com.tansun.easycare.rule.ml.model.entity;

import java.util.Date;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tansun.easycare.core.persistence.DataEntity;

/**
 * 模型增删改查Entity
 * @author zkx
 * @version 2018-08-22
 */
public class MlDataModel extends DataEntity<MlDataModel> {
	
	private static final long serialVersionUID = 1L;
	private int modelId;		// 模型id
	private String modelName;		// 模型名称
	private String modelDesc;		// 模型描述
	private String modelStatus;		// 模型状态
	private String dataFile;		// 数据文件
	private String algorithmType;		// 算法类型
	private String userId;		// 用户id
	private String resultFile;	//结果文件
	@JsonFormat(pattern = "yyyaFily-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date createTime;		// 创建时间
	
	public MlDataModel() {
		super();
	}

	public MlDataModel(int modelId) {
		super();
		this.modelId = modelId;
	}

	public MlDataModel(int modelId, String algorithmType) {
		super();
		this.modelId = modelId;
		this.algorithmType = algorithmType;
	}

	public MlDataModel(int modelId, String dataFile, String algorithmType) {
		super();
		this.modelId = modelId;
		this.dataFile = dataFile;
		this.algorithmType = algorithmType;
	}

	@Length(min=1, max=32, message="模型id长度必须介于 1 和 32 之间")
	public int getModelId() {
		return modelId;
	}

	public void setModelId(int modelId) {
		this.modelId = modelId;
	}
	
	@Length(min=0, max=100, message="模型名称长度必须介于 0 和 100 之间")
	public String getModelName() {
		return modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}
	
	@Length(min=0, max=200, message="模型描述长度必须介于 0 和 200 之间")
	public String getModelDesc() {
		return modelDesc;
	}

	public void setModelDesc(String modelDesc) {
		this.modelDesc = modelDesc;
	}
	
	@Length(min=0, max=1, message="模型状态长度必须介于 0 和 1 之间")
	public String getModelStatus() {
		return modelStatus;
	}

	public void setModelStatus(String modelStatus) {
		this.modelStatus = modelStatus;
	}
	
	@Length(min=0, max=255, message="数据文件长度必须介于 0 和 255 之间")
	public String getDataFile() {
		return dataFile;
	}

	public void setDataFile(String dataFile) {
		this.dataFile = dataFile;
	}
	
	@Length(min=0, max=20, message="算法类型长度必须介于 0 和 20 之间")
	public String getAlgorithmType() {
		return algorithmType;
	}

	public void setAlgorithmType(String algorithmType) {
		this.algorithmType = algorithmType;
	}
	

	
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getResultFile() {
		return resultFile;
	}

	public void setResultFile(String resultFile) {
		this.resultFile = resultFile;
	}

	@Override
	public String toString() {
		return "MlDataModel [modelId=" + modelId + ", modelName=" + modelName + ", modelDesc=" + modelDesc
				+ ", modelStatus=" + modelStatus + ", date=" + dataFile + ", algorithmType=" + algorithmType
				+ ", user=" + userId + ", createTime=" + createTime + "]";
	}
	
}